package com.ganee.agora.api;

import com.ganee.agora.model.ClientTokenEntity;
import com.ganee.agora.model.CollectActivityEntity;
import com.ganee.agora.model.CommentEntity;
import com.ganee.agora.model.DetailEntity;
import com.ganee.agora.model.FileEntity;
import com.ganee.agora.model.InsertActivityEntity;
import com.ganee.agora.model.HomeListBean;
import com.ganee.agora.model.InviteInfoEntity;
import com.ganee.agora.model.SupportCommentInfoEntity;
import com.ganee.agora.model.TicketInfoEntity;
import com.ganee.agora.model.UserInfoEntity;
import com.ganee.baselib.httprequest.base.BaseResponse;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;

public interface MainApiService {
    //首页列表
    @POST("agora/API/active/queryIndexActiveInfo")
    Observable<BaseResponse<List<HomeListBean>>> postHomeList();

    //查询用户信息
    @POST("agora/API/user/queryUserInfo")
    Observable<BaseResponse<UserInfoEntity>> postUserInfo();

    //更新用户信息
    @POST("agora/API/user/updateUserInfo")
    Observable<BaseResponse<UserInfoEntity>> updateUserInfo(
            @Body RequestBody body
    );

    //上传头像
    @POST("agora/API/user/uploadUserPicture")
    Observable<BaseResponse<UserInfoEntity>> uploadUserPic(
            @Body RequestBody body
    );

    //获取头像
    @POST("agora/API/user/downloadUserPicture")
    Observable<BaseResponse<UserInfoEntity>> downloadUserPic();

    //发布活动 InsertRequestBody
    @POST("agora/API/active/insertActiveInfo")
    Observable<BaseResponse<InsertActivityEntity>> postEvent(
            @Body RequestBody body
    );

    //已发布活动
    @POST("agora/API/active/queryPublishActiveInfo")
    Observable<BaseResponse<List<InsertActivityEntity>>> getHostEventList();

    //收藏列表
    @POST("agora/API/active/queryCollectActiveInfo")
    Observable<BaseResponse<List<InsertActivityEntity>>> getCollectList();

    //已报名列表
    @POST("agora/API/active/queryEnrollActiveInfo")
    Observable<BaseResponse<List<InsertActivityEntity>>> getRegistrationsList();


    //详情
    @POST("agora/API/active/queryActiveInfo")
    Observable<BaseResponse<DetailEntity>> postDetailInfo(
            @Body RequestBody body
    );

    //推荐列表
    @POST("agora/API/active/queryRecommendActiveInfo")
    Observable<BaseResponse<List<InsertActivityEntity>>> getRecommendList();

    //评论列表
    @POST("agora/API/active/queryActiveCommentInfo")
    Observable<BaseResponse<List<CommentEntity>>> getCommentList(
        @Body RequestBody body
    );

    //活动邀请页
    @POST("agora/API/active/queryActiveInviteInfo")
    Observable<BaseResponse<InviteInfoEntity>> getInviteInfo(
            @Body RequestBody body
    );

    //点赞评论
    @POST("agora/API/active/insertSupportCommentInfo")
    Observable<BaseResponse<SupportCommentInfoEntity>> postSupportComment();

    //新增评论
    @POST("agora/API/active/insertActiveCommentInfo")
    Observable<BaseResponse<CommentEntity>> postComment(
            @Body RequestBody body
    );

    //新增活动喜欢
    @POST("agora/API/active/insertActivePreferInfo")
    Observable<BaseResponse> postPrefer();

    //获取token
    @POST("agora/API/order/queryClientToken")
    Observable<BaseResponse<ClientTokenEntity>> getClientToken(
            @Body RequestBody body
    );

    //支付
    @POST("agora/API/order/executePay")
    Observable<BaseResponse<String>> postExecutePay(
            @Body RequestBody body
    );

    //搜索列表
    @POST("agora/API/active/searchActiveInfo")
    Observable<BaseResponse<List<InsertActivityEntity>>> getSearchList(
            @Body RequestBody body
    );

    //订单信息
    @POST("agora/API/order/queryTicketInfo")
    Observable<BaseResponse<TicketInfoEntity>> getTicketInfo(
            @Body RequestBody body
    );
    //核验订单
    @POST("agora/API/order/verificatTicketInfo")
    Observable<BaseResponse> verifyTicketInfo(
            @Body RequestBody body
    );

    //上传文件
    @POST("agora/API/active/uploadFile")
    Observable<BaseResponse<FileEntity>> postUploadFile(
            @Body RequestBody body
    );

    //收藏活动
    @POST("agora/API/active/insertCollectActiveInfo")
    Observable<BaseResponse> postCollect(
            @Body RequestBody body
    );

    //取消收藏活动
    @POST("agora/API/active/cancelCollectActiveInfo")
    Observable<BaseResponse> postCancelCollect(
            @Body RequestBody body
    );

    //免费报名活动
    @POST("/agora/API/active/insertEnrollActiveInfo")
    Observable<BaseResponse> postEnroll(
            @Body RequestBody body
    );
    //查询过期票
    @POST("/agora/API/order/queryPastTicketInfo")
    Observable<BaseResponse<List<TicketInfoEntity>>> postPastTicketList();

    //查询过期票
    @POST("/agora/API/order/queryUncommingTicketInfo")
    Observable<BaseResponse<List<TicketInfoEntity>>> postUpCommingTicketList();

}
